let loginUrl = '/api/user/loginByCode';
let getUserInfoUrl = '/api/user/getUserInfo';
let mySpaceUrl = '/api/my_space/list'
let spaceurl = '/api/space/list'
let spaceInfoUrl = '/api/space/read'
let createurl = '/api/my_space/create'
let deleteTempSpaceUrl = '/api/my_space/deleteTempSpace'
let bind_for_my_space = '/api/my_space/bind_for_my_space'
let liwu = "/api/gift/list"
let hasGiftUrl = '/api/gift/hasGift'
let ReceiveGiftUrl = '/api/gift/receive'
let modularUrl = "/api/space/modular"
let IsSign = "/api/sign_in/index"
let daka = "/api/sign_in/sign"
let countUrl = '/api/sign_in/count'
let monthUrl = '/api/sign_in/month'
let shanchu = '/api/diary/delete'
//日记列表
let riji = "/api/diary/records"
let scpl = "/api/diary/comment_del"
let rjbj = "/api/diary/list"
let jiesuo = "/api/diary/unlock"
let emo = "/api/diary/emoji"
let xies = '/api/diary/write'
let jinianri = '/api/anniversary/list'
let xinzeng = '/api/anniversary/create'
let bianji = "/api/anniversary/edit"
let shuij = "/api/my_space/sleep"
let yibai = "/api/my_thing/list"
let tjxs = '/api/my_thing/create'
let beijing = "/api/space/media"
let my_gift = '/api/gift/my_gift'
const install = (Vue, vm) => {
	let login = (params = {}) => vm.$u.post(loginUrl, params);
	let getUserInfo = (params = {}) => vm.$u.post(getUserInfoUrl, params);
	let my_space = (params = {}) => vm.$u.get(mySpaceUrl, params);
	let space_info = (params = {}) => vm.$u.get(spaceInfoUrl, params);
	let setspaceurl = (params = {}) => vm.$u.get(spaceurl, params);
	let create = (params = {}) => vm.$u.post(createurl, params);
	let deleteTempSpace = (params = {}) => vm.$u.post(deleteTempSpaceUrl, params);
	let bind_my_space = (params = {}) => vm.$u.post(bind_for_my_space, params);
	let gift = (params = {}) => vm.$u.get("/api/gift/list", params);
	let hasGift = (params = {}) => vm.$u.post(hasGiftUrl, params);
	let receivegift = (params = {}) => vm.$u.post(ReceiveGiftUrl, params);
	let modular = (params = {}) => vm.$u.get(modularUrl, params);
	let sign = (params = {}) => vm.$u.get(IsSign, params);
	let ksidaka = (params = {}) => vm.$u.post(daka, params);
	let count = (params = {}) => vm.$u.post(countUrl, params);
	let month = (params = {}) => vm.$u.get(monthUrl, params);
	let records = (params = {}) => vm.$u.get(riji, params);
	let diary_delete = (params = {}) => vm.$u.post(shanchu, params);
	let comment_del = (params = {}) => vm.$u.post(scpl, params);
	let diary_list = (params = {}) => vm.$u.get(rjbj, params);
	let unlock = (params = {}) => vm.$u.post(jiesuo, params);
	let emoji = (params = {}) => vm.$u.get(emo, params);
	let write = (params = {}) => vm.$u.post(xies, params);
	let anniversaryList = (params = {}) => vm.$u.get(jinianri, params);
	let addcreate = (params = {}) => vm.$u.post(xinzeng, params);
	let edit = (params = {}) => vm.$u.post(bianji, params);
	let sleep = (params = {}) => vm.$u.get(shuij, params);
	let MyThing = (params = {}) => vm.$u.get(yibai, params);
	let AddMthing = (params = {}) => vm.$u.get(tjxs, params);
	let media = (params = {}) => vm.$u.get(beijing, params);
	let my_gifts = (params = {}) => vm.$u.get('/api/gift/my_gift', params);
	let qrcode = (params = {}) => vm.$u.get('/api/common/qrcode', params);
	let xie = (params = {}) => vm.$u.get('/api/diary/comment', params);
	let like = (params = {}) => vm.$u.get('/api/diary/like', params);
	let album = (params = {}) => vm.$u.get('/api/album/index', params);
	let AlbumSave = (params = {}) => vm.$u.post('/api/album/save', params);
	let HelpList = (params = {}) => vm.$u.post('/api/help/list', params);
	let my_space_delete = (params = {}) => vm.$u.post('/api/my_space/delete', params);
	let aunt_save = (params = {}) => vm.$u.post('/api/aunt/save', params);
	let aunt_status = (params = {}) => vm.$u.post('/api/aunt/status', params);
	let change_media = (params = {}) => vm.$u.post('/api/my_space/change_media', params);
	let thingunlock = (params = {}) => vm.$u.post('/api/my_thing/unlock', params);
	let background = (params = {}) => vm.$u.post('/api/album/background', params);
	let auntList = (params = {}) => vm.$u.post('/api/aunt/index', params);
	let config = (params = {}) => vm.$u.post('/api/common/config', params);
	let setgive = (params = {}) => vm.$u.post('/api/gift/give', params);
	let avg = (params = {}) => vm.$u.post('/api/aunt/avg', params);
	let forecast = (params = {}) => vm.$u.post('/api/aunt/forecast', params);
	let join = (params = {}) => vm.$u.post('/api/location/join', params);
	let creates = (params = {}) => vm.$u.post('/api/location/create', params);
	let refresh = (params = {}) => vm.$u.post('/api/location/refresh', params);
	let distance = (params = {}) => vm.$u.post('/api/location/distance', params);
	let auntdel = (params = {}) => vm.$u.post('/api/aunt/del', params);
	let aunthistory = (params = {}) => vm.$u.post('/api/aunt/history', params);
	let props = (params = {}) => vm.$u.get('/api/pet/props', params);
	let foods = (params = {}) => vm.$u.get('/api/pet/foods', params);
	let adopt = (params = {}) => vm.$u.get('/api/pet/adopt', params);
	let petlist = (params = {}) => vm.$u.get('/api/pet/list', params);
	let buy_prop = (params = {}) => vm.$u.get('/api/pet/buy_prop', params);
	let buy_foods = (params = {}) => vm.$u.post('/api/pet/buy_foods', params);
	let petbag = (params = {}) => vm.$u.get('/api/pet/bag', params);
	let use_prop = (params = {}) => vm.$u.post('/api/pet/use_prop', params);
	let feeding = (params = {}) => vm.$u.post('/api/pet/feeding', params);
	let explore_record = (params = {}) => vm.$u.get('/api/pet/explore_record', params);
	let sunflower = (params = {}) => vm.$u.get('/api/pet/sunflower', params);
	let seed = (params = {}) => vm.$u.get('/api/pet/seed', params);
	let reduction_time = (params = {}) => vm.$u.get('/api/pet/reduction_time', params);
	let seed_meal = (params = {}) => vm.$u.get('/api/pet/seed_meal', params);
	let buy_seed = (params = {}) => vm.$u.get('/api/pet/buy_seed', params);
	let receive_food = (params = {}) => vm.$u.get('/api/pet/receive_food', params);
	let uinfo = (params = {}) => vm.$u.get('/api/user/info', params);
	let my_name = (params = {}) => vm.$u.get('/api/stone/my_name', params);
	let third = (params = {}) => vm.$u.post('/api/user/third', params);
	let getAuthUrl = (params = {}) => vm.$u.post('/addons/third/api/getAuthUrl', params);
	let wxConfig = (params = {}) => vm.$u.post('/api/wechat/index', params);

	let addLocationRoom = (params = {}) => vm.$u.post('/api/location/addLocationRoom', params);
	let updateLocationRoom = (params = {}) => vm.$u.post('/api/location/updateLocationRoom', params);
	let leaveLocationRoom = (params = {}) => vm.$u.post('/api/location/leaveLocationRoom', params);

	vm.$u.api = {
		wxConfig,
		getAuthUrl,
		auntList,
		login,
		getUserInfo,
		my_space,
        space_info,
		setspaceurl,
		create,
		gift,
		hasGift,
		modular,
		sign,
		ksidaka,
		count,
		month,
		records,
		diary_delete,
		comment_del,
		diary_list,
		unlock,
		emoji,
		write,
		anniversaryList,
		addcreate,
        deleteTempSpace,
		edit,
		sleep,
		MyThing,
		AddMthing,
		media,
		my_gifts,
		qrcode,
		bind_my_space,
		xie,
		like,
		album,
		AlbumSave,
		HelpList,
		my_space_delete,
		aunt_save,
		aunt_status,
		change_media,
		thingunlock,
		background,
		config,
		setgive,
		avg,
		forecast,
		join,
		creates,
		distance,
		auntdel,
		aunthistory,
		props,
		foods,
		adopt,
		petlist,
		buy_prop,
		buy_foods,
		petbag,
		use_prop,
		feeding,
		explore_record,
		sunflower,
		seed,
		reduction_time,
		seed_meal,
		buy_seed,
		receive_food,
		uinfo,
		my_name,
		third,
        refresh,
        receivegift,
        addLocationRoom,
        updateLocationRoom,
        leaveLocationRoom,
	};
}

export default {
	install
}
